import {defineStore} from 'pinia'
export default defineStore('his',{
	actions:{
		addhis(data){
			const index=this.history.findIndex(e=>e==data)
			if(index!==-1){
				this.history.splice(index,1)
			}
			this.history.unshift(data)
			if(this.history.length>10){
				this.history.pop()
			}
		}
	},
	state(){
		return {
			 history:[]
		}
	},
	unistorage:{
		paths:['history']
	}
})